package com.suixun.dao.onlinepaymanage;

import java.util.List;
import java.util.Map;

import com.suixun.entity.ChongqingOrderDO;
import com.suixun.entity.DiscountOrderDO;
import com.suixun.entity.Factory;
import com.suixun.entity.OnlinePayInfo;
import com.suixun.entity.RenewalOrderDO;
import com.suixun.entity.page.PageModel;

/**
 * 
 * <p>Title: OnlinepayManageDAO</p>
 * <p> 功能描述:线上购买DAO </p> 
 * @author	陈显强
 * @date	2016年12月19日下午1:45:52
 * @version 1.0
 */
public interface OnlinepayManageDAO {
	/**
	 * 
	 * <p>Title: queryByPaging</p>
	 * <p> 功能描述:分页查询线上购买数据 </p>
	 * @param pageModel
	 * @return
	 */
	List<OnlinePayInfo> queryByPaging(PageModel<?> pageModel);
	/**
	 * 
	 * <p>Title: countRows</p>
	 * <p> 功能描述:查询筛选后的行数 </p>
	 * @param pageModel
	 * @return
	 */
	Integer countRows(PageModel<?> pageModel);
	
	/**
	 * 
	 * <p>Title: countSendRows</p>
	 * <p> 功能描述:查询已发货条数 </p>
	 * @return
	 */
	Integer countSendRows();
	/**
	 * 
	 * <p>Title: queryFactorys</p>
	 * <p> 功能描述:查询所有厂商 </p>
	 * @return
	 */
	List<Factory> queryFactorys();
	
	/**
	 * 
	 * <p>Title: queryIMEI</p>
	 * <p> 功能描述:查询devicelists表中的IMEI号 </p>
	 * @param map
	 * @return
	 */
	List<String> queryIMEIFromDevicelists(Map<String,Object> map);
	
	/**
	 * 
	 * <p>Title: queryIMEIFromPurchaseDelivery</p>
	 * <p> 功能描述:查询purchase_delivcery表中的imei号 </p>
	 * @param map
	 * @return
	 */
	List<String> queryIMEIFromPurchaseDelivery(Map<String,Object> map);
	/**
	 * 
	 * <p>Title: queryIMEIFromIotDevice</p>
	 * <p> 功能描述:查询std_iot_device是否存在 </p>
	 * @param map
	 * @return
	 */
	List<String> queryIMEIFromIotDevice(Map<String,Object> map);
	
	/**
	 * 
	 * <p>Title: addPurchaseDelivery</p>
	 * <p> 功能描述:添加purchaseDelivery信息 </p>
	 * @param purchasedelivery
	 * @return
	 */
	int addPurchaseDelivery(Map<String,Object> map);
	
	/**
	 * <p>Title: queryDiscountList</p>
	 * <p> 功能描述:分页查询促销订单 </p>
	 * @param pageModel
	 * @return
	 */
	List<DiscountOrderDO> queryDiscountList(PageModel<?> pageModel);
	/**
	 * <p>Title: countDiscountRows</p>
	 * <p> 功能描述:查询促销订单总行数 </p>
	 * @param pageModel
	 * @return
	 */
	Integer countDiscountRows(PageModel<?> pageModel);
	/**
	 * <p>Title: getSchoolNames</p>
	 * <p> 功能描述:获取优惠促销的学校列表 </p>
	 * @return
	 */
	List<DiscountOrderDO> getSchoolNames(Integer orderfrom);
	
	int updateOrder(Map<String,Object> map);
	
	List<ChongqingOrderDO> listChongqingOrder(PageModel pageModel);
	
	Integer countChongqingOrder(PageModel pageModel);
	
	List<ChongqingOrderDO> getChongqingOrderByParam(Map<String,Object> map);
	/**
	 * <p>Title: getRenewalOrderList</p>
	 * <p> 功能描述:获取续费订单列表 </p>
	 * @param pageModel
	 * @return
	 */
	List<RenewalOrderDO> getRenewalOrderList(PageModel<?> pageModel);
	/**
	 * <p>Title: getRenewalOrderRows</p>
	 * <p> 功能描述:获取续费总行数 </p>
	 * @param pageModel
	 * @return
	 */
	Integer getRenewalOrderRows(PageModel<?> pageModel);
	
	
	int addNewPurchaseDelivery(Map<String,Object> map);
}
